/**
 * Copyright(c) 2010 Ceno Techonologies Co., Ltd.
 *
 * History:
 *   15-6-26 上午11:41 Created by piaohh
 */
package com.xunton.bss.weixin.api.message.event.impl;

import java.util.Date;
import javax.inject.Inject;
import javax.inject.Named;

import com.jade.framework.base.criterion.Criteria;
import com.jade.framework.base.util.PagingList;
import com.xunton.bss.weixin.api.message.event.CouponEventManager;
import com.xunton.bss.weixin.api.message.event.EventDao;
import com.xunton.bss.weixin.api.message.event.coupon.CouponEvent;

/**
 *
 * @author <a href="mailto:Administrator@ceno.cn">piaohh</a>
 * @version 1.0 15-6-26 上午11:41
 */
@Named ("weixin_couponEventManager")
public class CouponEventManagerImpl implements CouponEventManager
{
    private EventDao eventDao ;

    @Inject
    public void setEventDao(@Named ("weixin_eventDao") EventDao eventDao)
    {
        this.eventDao = eventDao;
    }

    public PagingList<CouponEvent> query(Criteria criteria)
    {
        return eventDao.query(criteria);
    }

    public long statCouponCount(long id, String type, Date beginDate, Date endDate)
    {
        return eventDao.statCouponCount(id,type,beginDate,endDate);
    }
}
